from django import forms
from utils.LoginForm import data_identity


class AuthorForm(forms.Form):
    name = forms.CharField(
        label='姓名'
    )
    age = forms.IntegerField(
        label='年龄'
    )
    gender = forms.fields.ChoiceField(
        choices=((1, "男性"), (2, "女性"), (3, "保密")),
        label="性别",
        initial=3,
        widget=forms.widgets.RadioSelect()
    )
    email = forms.EmailField(
        label='联系邮箱'
    )
    addr = forms.CharField(
        label='地址',
        required=False,
        initial='保密',
        validators=[data_identity]
    )
    desc = forms.CharField(
        label='简介',
        initial='这是一个神秘的人~',
        widget=forms.Textarea
    )
